

module.exports = {
    entry: './src/index.js', // 入口文件路径
    output: {
        path: '/',
        filename: 'bundle.js',
        auxiliaryComment: "Test Comment"
    },
    devServer: {
        port: 8080
    },
    devtool: 'inline-source-map',
    module: {
        loaders: [
            {
                test: /\.js$/, // babel 转换为兼容性的 js
                exclude: /node_modules/,
                loader: 'babel-loader',
                query: {
                    presets: ['react', 'latest']
                }
            },
            {
                test: /\.css$/,
                loader: "style-loader!css-loader"
            }
        ]
    }
}